# -*- coding: utf-8 -*-
# @Time: 2021/8/9 8:47
# @File: problem-70.py
# @DESC:

def climbStairs(n: int) -> int:
    if n <= 2:
        return n
    else:
        a = 1
        b = 2
        for i in range(3, n + 1):
            temp = a + b
            a = b
            b = temp
    return b


r =  climbStairs(2)
print(r)